[Previous] [Next] [Index] [Thread]

Clearing Password on Form



Hello all,

My first post to this list, hopefully not an FAQ.

Software level: Netscape 2.02 on Windows 3.1

I have a POST method form with username and password fields on it.  The
username field is defined as type=text and the password is defined as
type=password.  I would like to clear the form (to prevent reposting data)
after the form is unloaded.  

I have tried to access the values using Javascript:
<html><body>
<form name=formname method=post>
<input type=text name=userid length=8>
<input type=password name=passwd length=8>
<input type=button name=sendme onClick=eval(this.form)>
</form>
<script language=javascript>
<!-- hide js
 document.formname.passwd.value = "";
 document.formname.userid.value = "";
// end js -->
</body></html>

This clears the userid value but not the password value.  I would like a
better way to do this other than Javascript.  Is there a server-side push or
something I can use to zap the form?  Expiring and Pragma: no-cache on the
form does not help when the user is using the "forward/backward" buttons.

TIA

Byron Chun
byron@wellsfargo.com

===================================
Byron Chun
byron@wellsfargo.com
"Calm down. It's only 1's and 0's."